package com.lx.patterns.responsibility;

/**
 * @ClassName Client
 * @Description: 客户端
 * @Author: 落雪
 * @CreateDate: 2025/2/11 20:36
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/2/11 20:36
 * @UpdateRemark:
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        LeaveRequest request = new LeaveRequest("小明", 3, "小明同学身体不健康，请假3天");

        Handler groupLeader = new GroupLeader();
        Handler manager = new Manager();
        Handler generalManager = new GeneralManager();
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);
        groupLeader.submitLeave(request);
    }
}
